Lovely Website, Carry on the good work.
-
candland
Seems like this method might be the issue: The problems seems to be that the ical feed doesn't have a STANDARD section, only a DAYLIGHT.
/lib/ri_cal/component/timezone.rb:50
# Returns the set of TimezonePeriod instances that are valid for the given # local time as an array. If you just want a single period, use # period_for_local instead and specify how ambiguities should be resolved. # Returns an empty array if no periods are found for the given time. def periods_for_local(local) local = local.to_ri_cal_date_time_value candidate_standard = last_before_local(standard, local) candidate_daylight = last_before_local(daylight, local) if candidate_daylight && candidate_daylight.swallows_local?(local, candidate_standard) [] # Invalid local time elsif candidate_standard if candidate_daylight if candidate_daylight.dtstart > candidate_standard.dtstart [candidate_daylight] elsif candidate_standard.ambiguous_local?(local) [candidate_daylight, candidate_standard] else [candidate_standard].compact end else [candidate_standard].compact end end endmst = <<MST
BEGIN:VCALENDAR
PRODID:-//SuperSaaS//Super Schedule//EN
METHOD:PUBLISH
VERSION:2.0
CALSCALE:GREGORIAN
X-WR-CALNAME:Fluid Meeting Space
X-WR-TIMEZONE:America/Denver
X-WR-RELCALID:40409
BEGIN:VTIMEZONE
TZID:America/Denver
BEGIN:DAYLIGHT
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
DTSTART:20110313T030000
RDATE:20110313T030000
TZNAME:MDT
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:1641738@supersaas.com
DTSTAMP:20110519T192544Z
DTSTART;TZID=America/Denver:20110428T120000
DTEND;TZID=America/Denver:20110428T130000
SUMMARY:Dusty
DESCRIPTION:Test Meeting
CREATED:20110428T210637Z
LAST-MODIFIED:20110428T210637Z
URL:http://www.supersaas.com/schedule/red27/Fluid_Meeting_Space?year=20...
onth=4&day=28 END:VEVENT
END:VCALENDAR
MSTIs this a ical issue or a ri_cal issue?
-
candland
Here's the code I ended up using.
module RiCal class Component class Timezone < Component def periods_for_local(local) puts "PATCHED Periods for local" local = local.to_ri_cal_date_time_value candidate_standard = last_before_local(standard, local) candidate_daylight = last_before_local(daylight, local) if candidate_daylight && candidate_daylight.swallows_local?(local, candidate_standard) [] # Invalid local time elsif candidate_standard if candidate_daylight if candidate_daylight.dtstart > candidate_standard.dtstart [candidate_daylight] elsif candidate_standard.ambiguous_local?(local) [candidate_daylight, candidate_standard] else [candidate_standard].compact end else [candidate_standard].compact end elsif candidate_daylight [candidate_daylight] end end end end end -
carlosbrab (at mail)
- Title changed from You have a nil object when you didn't expect it! - DTSTART to Lovely Website, Carry on the good work.
- Assigned user set to Rick DeNatale
Thank you! I value this.
This is really interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your great post
Here is my blog - http://www.onlinecigarettestoreus.com/
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.